package ca.etsmtl.log430.lab3.donnee.beans;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author  samuel
 */
public class TeacherBeanBuilder {
	/**
	 * Teacher's Last Name
	 * @uml.property  name="lastName"
	 */
	private  String lastName;
	
	/**
	 * Teacher's First Name
	 * @uml.property  name="firstName"
	 */
	private    String firstName;
	
	/**
	 * Teacher's identification number
	 * @uml.property  name="teacherID"
	 */
	private   String teacherID;
	
	/**
	 * teacher type (PRF = prof, CHR = charge de cours, e.g. T.A. in French)
	 * @uml.property  name="teacherType"
	 */
	private   String teacherType;

	/**
	 * List of courses taken by the student
	 * @uml.property  name="coursesTaughtList"
	 * @uml.associationEnd  multiplicity="(0 -1)" elementType="java.lang.String"
	 */
	private   Collection<String> coursesTaughtList=new ArrayList<String>();

	/**
	 * List of courses the student is registered for
	 * @uml.property  name="coursesAssignedList" multiplicity="(0 -1)"
	 */
	private    Collection<String>  coursesAssignedList=new ArrayList<String>();
	
	
	public TeacherBean build()
	{
		return new TeacherBean(lastName, firstName, teacherID, teacherType, coursesTaughtList, coursesAssignedList);
	}
	

	/**
	 * @param lastName
	 * @uml.property  name="lastName"
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	/**
	 * @param firstName
	 * @uml.property  name="firstName"
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @param teacherID
	 * @uml.property  name="teacherID"
	 */
	public void setTeacherID(String teacherID) {
		this.teacherID = teacherID;
	}

	/**
	 * @param teacherType
	 * @uml.property  name="teacherType"
	 */
	public void setTeacherType(String teacherType) {
		this.teacherType = teacherType;
	}

	/**
	 * @param coursesTaughtList
	 * @uml.property  name="coursesTaughtList"
	 */
	public void setCoursesTaughtList(Collection<String> coursesTaughtList) {
		this.coursesTaughtList = coursesTaughtList;
	}

	/**
	 * @param coursesAssignedList
	 * @uml.property  name="coursesAssignedList"
	 */
	public void setCoursesAssignedList(Collection<String> coursesAssignedList) {
		this.coursesAssignedList = coursesAssignedList;
	}


	public void addTaughtCoursesTaughtList(String token) {
		if(null==coursesTaughtList)
			coursesTaughtList=new ArrayList<String>();
		coursesTaughtList.add(token);
		
	}
}
